# -*- coding: utf-8 -*-

import MySQLdb
import sys
import os

reload(sys)
sys.setdefaultencoding('utf-8')

db = MySQLdb.connect("192.168.3.14","root","123","phoenix")
cursor = db.cursor()
query_sql = """select * from stock_meta limit 3"""

cursor.execute(query_sql)
datas = cursor.fetchall()
for data in datas:
    print data
print cursor.rowcount,"rows in tatal"
# db.close


s="张的萨菲"

print(s)

# insert_sql="""insert into stock_history_info values()"""
# try:
#     cursor.execute(insert_sql)
#     db.commit()
# except:
#     db.rollback()
# db.close


